<?php

namespace App\Http\Controllers\Stats\User;

use Helper\Timed;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Resources\Stats\User\Player\DayResource;
use App\Http\Resources\Stats\User\Player\WeekResource;
use App\Http\Resources\Stats\User\Player\MonthResource;
use App\Services\Stats\User\PlayerService;

/**
 *  统计-玩家分析
 */
class PlayerController extends Controller
{

	/**
	 * 玩家分析统计【天】
	 */
	public function day(Request $request)
	{
		$datas = PlayerService::create()->day($request);

		return DayResource::make($datas);
	}

	/**
	 * 玩家分析统计【周】
	 */
	public function week(Request $request)
	{
		$datas = PlayerService::create()->week($request);

		return WeekResource::make($datas);
	}

	/**
	 * 玩家分析统计【月】
	 */
	public function month(Request $request)
	{
		$datas = PlayerService::create()->month($request);

		return MonthResource::make($datas);
	}
}
